package com.jml;

import org.junit.Test;

import java.io.File;
import java.io.FileInputStream;
import java.util.Enumeration;
import java.util.Properties;

/**
 * @Author: J
 * @DATE: 2022-04-18 9:45
 */
public class Base {
    @Test
    public void a() throws Exception {
        String s = String.format("aaa%szzz", "自定义");
        System.out.println(s);
        Properties properties = new Properties();
        File file = new File("D:\\jml-code\\java_code\\more_demo\\java-base\\base\\src\\main\\java\\com\\jml\\application.properties");
        FileInputStream fileInputStream = new FileInputStream(file);
        properties.load(fileInputStream);
        Enumeration<?> enumeration = properties.propertyNames();
        while (enumeration.hasMoreElements()) {
            String key = (String) enumeration.nextElement();
            System.out.println(key);
            System.out.println(properties.getProperty(key));
        }

    }
}
